import Vue from "vue";
import Router from "vue-router";
import Home from "./components/rightPage/home/home";

Vue.use(Router);


export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
  	{
  		path:"/",
  		redirect:"/home",
      name: "home",
      component: Home
  	},
  	{
  		path:"/home",
      name: "home",
      component: Home
  	},
  	{
      path: "/blog",
      name: "blog",
      component: () =>
        import("./components/rightPage/blog/blog")
    },
  	{
      path: "/work",
      name: "work",
      component: () =>
        import("./components/rightPage/work/work")
    },
    {
      path: "/blog/:id",
      name: "info",
      component: () =>
        import("./components/rightPage/blog/info")
    },
    {
    	path: "/home/info",
      name: "home_info",
      component: () =>
        import("./components/rightPage/home/info"),
      children:[
      	{
      		path: "/home/info/mydata",
     			name: "home_info",
      		component: () =>
        		import("./components/rightPage/home/info/data/infoDataUser")
      	}
      ]
    },
  ]
});
